package com.example.farmer.Fragment.Add;

import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;

import androidx.fragment.app.Fragment;

import com.example.farmer.Activity.ProductPublishActivity;
import com.example.farmer.Activity.PurchasePublishActivity;
import com.example.farmer.R;

public class addFragment extends Fragment {

    private LinearLayout huoping;
    private LinearLayout caigou;

    public addFragment() {
        // Required empty public constructor
    }



    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        View view = inflater.inflate(R.layout.fragment_tianjia, container, false);
        huoping = view.findViewById(R.id.huoping);
        huoping.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(getActivity(), ProductPublishActivity.class);
                startActivity(intent);
            }
        });

        caigou = view.findViewById(R.id.caigou);
        caigou.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(getActivity(), PurchasePublishActivity.class);
                startActivity(intent);
            }
        });

        return view;
    }
}